﻿using HalconDotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIVision.InspectModule.Inspect.Models
{
    /// <summary>
    /// 检测结果模型，每个工位检测完成后结果存在该模型内
    /// </summary>
    public class InspectResultModel
    {
        /// <summary>
        /// 照片原图
        /// </summary>
        public HObject SourceImage { get; set; }
        /// <summary>
        /// 检查图像
        /// </summary>
        public HObject InspectImage { get; set; }
        /// <summary>
        /// 缺陷集合<名称，缺陷对象>
        /// </summary>
        public Dictionary<string, HObject> Defects { get; set; }
        /// <summary>
        /// 实际分数
        /// </summary>
        public int Score { get; set; }
        /// <summary>
        /// 实际分数
        /// </summary>
        public int OKScore { get; set; }
        /// <summary>
        /// 缺陷名称汇总
        /// </summary>
        public string DefectNameSummary
        {
            get
            {
                string defects = "";
                foreach (var v in Defects)
                {
                    defects += v.Key + ";";
                }
                return defects;
            }
        }
        public string InspectType { get; set; }

        public bool RunResult { get; set; }
        public string Message { get; set; }

        public string InspectImgPath { get; set; }
        public string DefectImgPath { get; set; }

    }
}
